namespace NAct.Tests.Support
{
	using System;
	using Attributes;
	using NUnit.Framework;
	using NUnit.Framework.SyntaxHelpers;

	public class PersonScenario
	{
		private User user;

		[ Given( "a user called (?<forename>[a-z]+) (?<surname>[a-z]+) born on (?<dob>[0-9]{1,2}/[0-9]{1,2}/[0-9]{2,4})" ) ]
		public void CreateUser( string forename, string surname, DateTime dob )
		{
			user = new User( forename, surname, dob );
		}

		[ Then( "age should be (?<age>[0-9]+)" ) ]
		public void VerifyAge( int age )
		{
			Assert.That( user.Age, Is.EqualTo( age ) );
		}

		[ And( "forename should be (?<value>[a-z]+)" ) ]
		public void VerifyForename( string value )
		{
			Assert.That( user.Forename, Is.EqualTo( value ) );
		}

		[ And( "surname should be (?<value>[a-z]+)" ) ]
		public void VerifySurname( string value )
		{
			Assert.That( user.Surname, Is.EqualTo( value ) );
		}
	}
}